package adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/7/18.
 */
public class FirstpageAdapter extends FragmentPagerAdapter {
    private Context context;
    private ArrayList<Fragment> arrayList;
    public FirstpageAdapter(FragmentManager fm,Context context,ArrayList<Fragment> arrayList) {
        super(fm);
        this.context = context;
        this.arrayList = arrayList;
    }

    @Override
    public Fragment getItem(int position) {
        return arrayList.get(position);
    }

    @Override
    public int getCount() {
        return arrayList.size();
    }
}
